package com.smartleanx.module.hrm.dal.mysql.dingDing;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.smartleanx.module.hrm.controller.admin.dingDing.vo.SystemFrameVo;
import com.smartleanx.module.hrm.dal.dataobject.dingDing.DingDept;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author mybatis-plus
 * @since 2024-10-15
 */
@Mapper
public interface DingDeptMapper extends BaseMapper<DingDept> {


    @Select("SELECT du.id id,du.name name , 2 type FROM `ding_user` as du left join  ding_dept_user ddu on ddu.user_id=du.userid where ddu.dept_id=#{departmentId} group by ddu.id")
    List<SystemFrameVo> selectEmployeesByDepartmentId(Integer  departmentId);

}
